package com.tgky.ybzb.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(
    value = "PageParam对象",
    description = "分页参数"
)
public class PageParam {
    @ApiModelProperty(
        value = "当前页",
        position = 1
    )
    private Integer pageCurrent = 1;
    @ApiModelProperty(
        value = "每页数量",
        position = 2
    )
    private Integer pageSize = 10;
    @ApiModelProperty(
        value = "排序字段",
        position = 3
    )
    private String orderBy;
    @ApiModelProperty(
        value = "正序or倒序",
        position = 4
    )
    private Boolean isAsc = true;

    public PageParam() {
    }

    public Integer getPageCurrent() {
        return this.pageCurrent;
    }

    public Integer getPageSize() {
        return this.pageSize;
    }

    public String getOrderBy() {
        return this.orderBy;
    }

    public Boolean getIsAsc() {
        return this.isAsc;
    }

    public void setPageCurrent(final Integer pageCurrent) {
        this.pageCurrent = pageCurrent;
    }

    public void setPageSize(final Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setOrderBy(final String orderBy) {
        this.orderBy = orderBy;
    }

    public void setIsAsc(final Boolean isAsc) {
        this.isAsc = isAsc;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PageParam)) {
            return false;
        } else {
            PageParam other = (PageParam)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$pageCurrent = this.getPageCurrent();
                    Object other$pageCurrent = other.getPageCurrent();
                    if (this$pageCurrent == null) {
                        if (other$pageCurrent == null) {
                            break label59;
                        }
                    } else if (this$pageCurrent.equals(other$pageCurrent)) {
                        break label59;
                    }

                    return false;
                }

                Object this$pageSize = this.getPageSize();
                Object other$pageSize = other.getPageSize();
                if (this$pageSize == null) {
                    if (other$pageSize != null) {
                        return false;
                    }
                } else if (!this$pageSize.equals(other$pageSize)) {
                    return false;
                }

                Object this$isAsc = this.getIsAsc();
                Object other$isAsc = other.getIsAsc();
                if (this$isAsc == null) {
                    if (other$isAsc != null) {
                        return false;
                    }
                } else if (!this$isAsc.equals(other$isAsc)) {
                    return false;
                }

                Object this$orderBy = this.getOrderBy();
                Object other$orderBy = other.getOrderBy();
                if (this$orderBy == null) {
                    if (other$orderBy != null) {
                        return false;
                    }
                } else if (!this$orderBy.equals(other$orderBy)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PageParam;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $pageCurrent = this.getPageCurrent();
        result = result * 59 + ($pageCurrent == null ? 43 : $pageCurrent.hashCode());
        Object $pageSize = this.getPageSize();
        result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());
        Object $isAsc = this.getIsAsc();
        result = result * 59 + ($isAsc == null ? 43 : $isAsc.hashCode());
        Object $orderBy = this.getOrderBy();
        result = result * 59 + ($orderBy == null ? 43 : $orderBy.hashCode());
        return result;
    }

    public String toString() {
        return "PageParam(pageCurrent=" + this.getPageCurrent() + ", pageSize=" + this.getPageSize() + ", orderBy=" + this.getOrderBy() + ", isAsc=" + this.getIsAsc() + ")";
    }
}
